home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1990 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  939 b 

  1. Path: mailhost.mwmicro.com!news
  2. From: aschlies@citynet.net
  3. Newsgroups: comp.lang.c
  4. Subject: Re: returning a string from a function
  5. Date: Thu, 18 Jan 1996 10:00:04 GMT
  6. Organization: MidWest Micro
  7. Message-ID: <4dkvo1$a5r@mailhost.mwmicro.com>
  8. References: <4d4uh8$q46@mailhost.mwmicro.com>
  9. NNTP-Posting-Host: pd011.mwmicro.com
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. aschlies@citynet.net (Tony Schliesser) wrote:
  13.  
  14. >I am learning C with the aid of only a book.  I am at an inpass in
  15. >this process.  I have a small function that needs to return a string
  16. >back to the main routine. I have the following prototype:
  17.  
  18. >char function_name(char in_string[80])
  19.  
  20. >{
  21. >    char value[80];
  22.  
  23. >    ...value takes on part of the value of the last 10 characters
  24. >      of in_string.
  25.  
  26. >    return(value);
  27. >}
  28.  
  29.  
  30. I want to thank those who posted a followup.  As soon as I read the
  31. first reply, the problem  was painfully obvious.
  32.  
  33. Again, Thanks.
  34.  
  35. Back to the compiler!
  36.  
  37. Tony
  38.  
  39.